import React from 'react';
import { NavigationContainer } from '@react-navigation/native';
import { createStackNavigator } from '@react-navigation/stack';
import ChatScreen from './screens/ChatScreen';
import WelcomeScreen from './screens/WelcomeScreen';
import { ChatProvider } from './contexts/ChatContext';

const Stack = createStackNavigator();

const App = () => {
  return (
    <ChatProvider>
      <NavigationContainer>
        <Stack.Navigator initialRouteName="Welcome">
          <Stack.Screen 
            name="Welcome" 
            component={WelcomeScreen} 
            options={{ headerShown: false }} 
          />
          <Stack.Screen 
            name="Chat" 
            component={ChatScreen} 
            options={{
              title: 'AI情感聊天助手',
              headerStyle: { backgroundColor: '#4F46E5' },
              headerTintColor: 'white',
              headerTitleStyle: { fontWeight: 'bold' }
            }} 
          />
        </Stack.Navigator>
      </NavigationContainer>
    </ChatProvider>
  );
};

export default App;    